package generics.and.colecctions.ordenacion.comparable;

public class ClaseImplementaComparable implements
		Comparable<ClaseImplementaComparable> {

	private int num;

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public int compareTo(ClaseImplementaComparable i) {
		if (this.num > i.num) {
			return 1;
		} else if (this.num < i.num) {
			return -1;
		} else if (this.num == i.num) {
			return 0;
		}
		return 0;
	}
}
